package com.shiroha.user.pojo;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.shiroha.common.handler.UUIDTypeHandler;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.UUID;

@Table(value = "follow", schema = "public")
@Data(staticConstructor = "create")
@Accessors(chain = true)
public class Follow {
    @Id(value = "id", keyType = KeyType.Auto)
    private String id;

    // 关注者id
    @Column(typeHandler = UUIDTypeHandler.class)
    private UUID followerId;

    @Column(ignore = true)
    private String followerName;

    // 被关注者id
    @Column(typeHandler = UUIDTypeHandler.class)
    private UUID followeeId;

    @Column(ignore = true)
    private String followeeName;

    private LocalDateTime createdAt;
}
